package com.cqhilink.iot.jobstandardmanagement.facade.model;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Arrays;
import java.util.List;

/**
 * 生产实体类型特性值类
 */
public class EntityTypeProperty extends BootstrapSearchBean implements Serializable {
    //特性ID
    private String devicePropertyId;
    //entity类型ID
    private String entityTypeId;
    //特性名称
    private String propertyName;
    //特性类型
    private String propertyType;
    //特性值
    private String propertyValue;
    //特性单位
    private String propertyUnit;
    //创建人
    private String creator;
    //创建时间
    private String createTime;
    //修改时间
    private String modifyTime;
    //修改人
    private String modifyer;
    //状态 0.正常 1.禁用
    private BigDecimal status;

    //临时数据
    private List<String> list;//集合
//    private String minValue;//最小
//    private String maxValue;//最大

    private String reportInfoName;//汇报内容

    private String itemName;//数据项内容



    public String getDevicePropertyId() {
        return devicePropertyId;
    }

    public void setDevicePropertyId(String devicePropertyId) {
        this.devicePropertyId = devicePropertyId;
    }

    public String getEntityTypeId() {
        return entityTypeId;
    }

    public void setEntityTypeId(String entityTypeId) {
        this.entityTypeId = entityTypeId;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    public String getPropertyType() {
        return propertyType;
    }

    public void setPropertyType(String propertyType) {
        this.propertyType = propertyType;
    }

    public String getPropertyValue() {
        return propertyValue;
    }

    public void setPropertyValue(String propertyValue) {
        this.propertyValue = propertyValue;
    }

    public String getPropertyUnit() {
        return propertyUnit;
    }

    public void setPropertyUnit(String propertyUnit) {
        this.propertyUnit = propertyUnit;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(String modifyTime) {
        this.modifyTime = modifyTime;
    }

    public String getModifyer() {
        return modifyer;
    }

    public void setModifyer(String modifyer) {
        this.modifyer = modifyer;
    }

    public BigDecimal getStatus() {
        return status;
    }

    public void setStatus(BigDecimal status) {
        this.status = status;
    }

    public List<String> getList() {
        if (propertyType.equals("2") || propertyType.equals("3")) {
            list = Arrays.asList(propertyValue.split(","));
        }
        return list;
    }

    public String getReportInfoName() {
        return reportInfoName;
    }

    public void setReportInfoName(String reportInfoName) {
        this.reportInfoName = reportInfoName;
    }

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    //    public String getMinValue() {
//        if (propertyType.equals("4")) {
//            String[] str = propertyValue.split(",");
//            if (str.length >= 1) {
//                minValue = str[0];
//            }
//        }
//        return minValue;
//    }

//    public String getMaxValue() {
//        if (propertyType.equals("4")) {
//            String[] str = propertyValue.split(",");
//            if (str.length >= 1) {
//                maxValue = str[1];
//            }
//        }
//        return maxValue;
//    }

}